package org.zl.mybatis.use;

import java.util.Arrays;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.annotation.MapperScans;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MapperScans({
		@MapperScan(basePackages = {"org.zl.mybatis.use.mapper",
				"org.zl.mybatis.use.nton",
				"org.zl.mybatis.use.meiju"})
})
public class Application {

	public static void main(String[] args) {
		ConfigurableApplicationContext ctx = SpringApplication.run(Application.class, args);
		
		System.out.println("----started-----");
//		Arrays.asList(ctx.getBeanDefinitionNames()).forEach(name->{
////			System.out.println(">>" + name);
//			if (name.toLowerCase().contains("datasource") || name.toLowerCase().contains("template") ) {
//				System.out.println("\t>>name=" + name + ", class=" + ctx.getBean(name).getClass());
//			}
//		});
//		System.out.println("----end-----");
	}

}
